use "kubota-replication-regression.dta", clear
ssc install estout, replace
*Descriptive Statistics
summarize coup_a coup_times coup_success1 coup_s_a l_y_a_pko l_y_a_mis c_3yr_pko_ave l_troop l_police l_eom l_polity2 l_milreg ucdp_l ln_rgdppc growth_l l_lnmilper l_milex l_chmilex l_milex_milper ln_oilpcl cabinet_l fdi_l coup_a_y
*Declaration of CSTS dataset
xtset ccode year, yearly

*表３
*Coup Outbreak 
*Model 0 w/0 interaction
*Coup Outbreak Fixed Effect
xtlogit coup_a l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, fe
estimates store fixed0
*Coup Outbreak Random Effect
xtlogit coup_a l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store random0
*Carrying out a Hausman Test
hausman fixed0 random0

*Model 0.5 w/0 interaction milex
*Coup Outbreak Fixed Effect
xtlogit coup_a l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, fe
estimates store fixed05
*Coup Outbreak Random Effect
xtlogit coup_a l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store random05
*Carrying out a Hausman Test
hausman fixed05 random05

*Model 1 with interaction
*Coup Outbreak Fixed Effect
xtlogit coup_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, fe
estimates store fixed1
*Coup Outbreak Random Effect
xtlogit coup_a  l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store random1
*pooled regression
logit coup_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3
estimates store pooled1
*Carrying out a Hausman Test
hausman fixed1 random1
esttab fixed0 random0 fixed05 random05 fixed1 random1 , se  stats(N ll chi2 p)

*Model 2 w/o chmilex
*Fixed Effect 
xtlogit coup_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, fe
estimates store fixed2
*Random Effect 
xtlogit coup_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store random2
*Carrying out a Hausman Test
hausman fixed2 random2
*Model 3 w/o chmilex and military expenditure per personnel
*Coup Outbreak Fixed Effect
xtlogit coup_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, fe
estimates store fixed3
*Coup Outbreak Random Effect
xtlogit coup_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store random3
*Carrying out a Hausman Test
hausman fixed3 random3
*Model 4 w/o chmilex and military expenditure per personnel and milper
*Coup Outbreak Fixed Effect
xtlogit coup_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, fe
estimates store fixed4
*Coup Outbreak Random Effect
xtlogit coup_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store random4
*Carrying out a Hausman Test
hausman fixed4 random4
*表３の作表
esttab fixed2 random2 fixed3 random3 fixed4 random4, se  stats(N ll chi2 p)

*model 5 Various IVs　（本文には収録しない付録表におけるロバストネスチェック）
*IV=average amount of contribution of personnel
xtlogit coup_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store IV1
*IV=average number of missions to participate
xtlogit coup_a l_y_a_mis c.l_y_a_mis#c.l_polity2 c.l_y_a_mis#c.ln_rgdppc c.l_y_a_mis#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store IV2
*IV=average amount of contribution of EOM
xtlogit coup_a l_eom c.l_eom#c.l_polity2 c.l_eom#c.ln_rgdppc c.l_eom#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store IV3
*IV=average amount of contribution of Police
xtlogit coup_a l_police c.l_police#c.l_polity2 c.l_police#c.ln_rgdppc c.l_police#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store IV4
*IV=average amount of contribution of Troops
xtlogit coup_a l_troop c.l_troop#c.l_polity2 c.l_troop#c.ln_rgdppc c.l_troop#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store IV5
*IV=3 years average amount of contribution of Troops
xtlogit coup_a c_3yr_pko_ave c.c_3yr_pko_ave#c.l_polity2 c.c_3yr_pko_ave#c.ln_rgdppc c.c_3yr_pko_ave#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store IV6
esttab IV1 IV2 IV3 IV4 IV5 IV6, se stats(N ll chi2 p)

*Event count model　（本文には収録しない付録表におけるロバストネスチェック）
*Fixed effects w/o interaction
xtnbreg coup_times l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3 , fe
estimates store EC0fixed
*Random effects w/o interaction
xtnbreg coup_times l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store EC0random
hausman EC0fixed EC0random
*Fixed effects with interaction
xtnbreg coup_times l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, fe
estimates store EC1fixed
*Random effects with interaction
xtnbreg coup_times l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store EC1random
hausman EC1fixed EC1random
esttab EC0fixed EC0random EC1fixed EC1random, se stats(N ll chi2 p)

*表４
*Heckman Sample Selection Model
*W/O interaction
heckprob coup_success1 l_y_a_pko  l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSS1
*interaction
heckprob coup_success1 l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg  l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSS2
esttab HSS1 HSS2, se stats(N ll chi2 p)

*w/o milex_milper and chmilex
heckprob coup_success1 l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg  l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSS3
*w/o milex_milper and chmilex
heckprob coup_success1 l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg  l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSS4
*表４の作表
esttab HSS3 HSS4, se stats(N ll chi2 p)

*DV=All Success（本文には収録しない付録表におけるロバストネスチェック）
*w/o interaction
heckprob coup_s_a l_y_a_pko  l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSS5a
*interaction
heckprob coup_s_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSS5b
esttab HSS5a HSS5b, se stats(N ll chi2 p)

*Various IVs（本文には収録しない付録表におけるロバストネスチェック）
*IV=average amount of contribution of personnel
heckprob coup_success1 l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg  l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSSIV1
*IV=average number of missions to participate
heckprob coup_success1 l_y_a_mis l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_y_a_mis l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSSIV2a
heckprob coup_success1 l_y_a_mis c.l_y_a_mis#c.l_polity2  l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_y_a_mis c.l_y_a_mis#c.l_polity2 c.l_y_a_mis#c.ln_rgdppc c.l_y_a_mis#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSSIV2b
*IV=average amount of contribution of EOM
heckprob coup_success1 l_eom l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_eom l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSSIV3a
heckprob coup_success1 l_eom c.l_eom#c.l_polity2 l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_eom c.l_eom#c.l_polity2 c.l_eom#c.ln_rgdppc c.l_eom#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSSIV3b
*IV=average amount of contribution of Police
*heckprob coup_success1 l_police  l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_police l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
*estimates store HSSIV4a
heckprob coup_success1 l_police c.l_police#c.l_polity2  l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_police c.l_police#c.l_polity2 c.l_police#c.ln_rgdppc c.l_police#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSSIV4b
*IV=average amount of contribution of Troops
heckprob coup_success1 l_troop l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_troop l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSSIV5a
heckprob coup_success1 l_troop c.l_troop#c.l_polity2  l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = l_troop c.l_troop#c.l_polity2 c.l_troop#c.ln_rgdppc c.l_troop#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
estimates store HSSIV5
*IV=3 years average amount of contribution of Troops
*heckprob coup_success1 c_3yr_pko_ave l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = c_3yr_pko_ave  l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
*estimates store HSSIV6a
*heckprob coup_success1 c_3yr_pko_ave c.c_3yr_pko_ave#c.l_polity2 l_polity2 sq_polity2 ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l coup_a_y, select(coup_a = c_3yr_pko_ave c.c_3yr_pko_ave#c.l_polity2 c.c_3yr_pko_ave#c.ln_rgdppc c.c_3yr_pko_ave#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3) vce(cluster ccode)
*estimates store HSSIV6b

*表５
*Success / failure of Coups -- logistic regression
*w/o interaction
logit coup_success1 l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
estimates store SFlog1
*w/o interaction milex
logit coup_success1 l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
estimates store SFlog2
*with interaction 
logit coup_success1 l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
estimates store SFlog3
*w/o economic effects
logit coup_success1 l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
estimates store SFlog4
*w/o economic effects and personnel
logit coup_success1 l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
estimates store SFlog5
*DV=success all
logit coup_s_a l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
estimates store SFlog6
*表５の作表
esttab SFlog1 SFlog2 SFlog3 SFlog4 SFlog5 SFlog6, se stats(N ll chi2 p)


*Success /Failure Various IVs　（本文には収録しない付録表におけるロバストネスチェック）
*IV=average number of missions to participate
*logit coup_success1 l_y_a_mis c.l_y_a_mis#c.l_polity2 c.l_y_a_mis#c.ln_rgdppc l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
*estimates store SFIV1
*IV=average amount of contribution of EOM
logit coup_success1 l_eom c.l_eom#c.l_polity2 c.l_eom#c.ln_rgdppc l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
estimates store SFIV2
*IV=average amount of contribution of Police
logit coup_success1 l_police c.l_police#c.l_polity2 c.l_police#c.ln_rgdppc l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
estimates store SFIV3
*IV=average amount of contribution of Troops
logit coup_success1 l_troop c.l_troop#c.l_polity2 c.l_troop#c.ln_rgdppc l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
estimates store SFIV4
*IV=3 years average amount of contribution of Troops1
logit coup_success1 c_3yr_pko_ave c.c_3yr_pko_ave#c.l_polity2 c.c_3yr_pko_ave#c.l_polity2#c.ln_rgdppc l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, vce(cluster ccode)
estimates store SFIV5
esttab SFIV2 SFIV3 SFIV4 SFIV5, se stats(N ll chi2 p)

*success/all country year
xtlogit coup_s1_bpro l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, fe
estimates store fixeds0
*Coup Outbreak Random Effect
xtlogit coup_s1_bpro l_y_a_pko l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store randoms0
*Carrying out a Hausman Test
hausman fixeds0 randoms0

*Model 1 with interaction
*Coup Outbreak Fixed Effect
xtlogit coup_s1_bpro l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, fe
estimates store fixeds1
*Coup Outbreak Random Effect
xtlogit coup_s1_bpro  l_y_a_pko c.l_y_a_pko#c.l_polity2 c.l_y_a_pko#c.ln_rgdppc c.l_y_a_pko#l_milreg l_polity2 sq_polity2  ln_rgdppc l_milreg growth_l l_lnmilper l_milex_milper l_chmilex ucdp_l ln_oilpcl cabinet_l fdi_l  coup_a_y coup_a_y2 coup_a_y3, re
estimates store randoms1
*Carrying out a Hausman Test
hausman fixeds1 randoms1
esttab fixeds0 randoms0 fixeds1 randoms1 , se  stats(N ll chi2 p)
